﻿@model  Dictionary<Tag, int>
@{
    string tagUrl = ViewData.Get<string>("baseUrl", null);
    bool isBlank = ViewData.Get<bool>("isBlank", false);
    ITagUrlGetter urlGetter = null;
}
<div class="tn-box-content tn-widget-content tn-corner-bottom">
    <p id="hot-tags" class="tn-tags-hot">
        @if (Model != null)
        {
            string url = null;

            foreach (var tag in Model)
            {
                if (urlGetter == null)
                {
                    urlGetter = TagUrlGetterManager.GetRegisteredGetter(tag.Key.TenantTypeId);
                }

                url = urlGetter != null ? urlGetter.GetUrl(tag.Key.TagName) : string.Empty;
            <span class="tn-font-size-@tag.Value"><a href="@url" data-tagname="@tag.Key.TagName" title="有@(tag.Key.OwnerCount)人定义,共有@(tag.Key.ItemCount)个内容" @if (isBlank)
                                                                                                                                                             { @Html.Raw("target=\"_blank\"") }>@Tunynet.Utilities.StringUtility.Trim(tag.Key.DisplayName, 6, "...")</a></span>
            }
        }
    </p>
</div>
